<template>
  <div>
    <BasicModal @register="registerSingle" :width="650">
      <template #title>
        <span class="firstTitle">{{ setTitle }}</span>
        <span class="subtitle">{{ subtitle }}</span>
      </template>
      <div class="main">
        <div class="main-table">
          <div class="main-table-item" v-for="(item, index) in listCurrency" :key="index">
            <span>{{ item.name }}：</span>
            <span>1111</span>
          </div>
        </div>
      </div>
    </BasicModal>
  </div>
</template>
<script lang="ts" setup>
  import { BasicModal, useModalInner } from '/@/components/Modal';
  import { ref } from 'vue';
  import { useI18n } from '/@/hooks/web/useI18n';
  import { useCurrencyStore } from '/@/store/modules/currency';

  const { getCurrencyList } = useCurrencyStore();
  const { t } = useI18n();
  const setTitle = ref(t('table.system.system_root_addMony') as any);
  const subtitle = ref('' as any);
  const listCurrency = ref();
  const [registerSingle] = useModalInner((data) => {
    //console.log(getCurrencyList);
    listCurrency.value = getCurrencyList;
    if (data.type === 'add') {
      setTitle.value = t('table.system.system_root_addMony');
      subtitle.value = t('table.system.system_root_tip3');
    } else {
      setTitle.value = t('table.system.system_root_single');
      subtitle.value = t('table.system.system_root_tip3');
    }
  });
</script>
<style lang="less" scoped>
  .subtitle {
    font-size: 12px;
    font-weight: 400;
    color: #b2b2b2;
    margin-left: 4px;
  }
  .main-table {
    display: flex;
    flex-wrap: wrap;
    padding: 0 20px;
    &-item {
      width: 25%;
      height: 42px;
      line-height: 42px;
      display: flex;
      justify-content: center;
      border-right: 1px solid #dadada;
      border-top: 1px solid #dadada;
    }
    &-item:nth-last-child(-n + 4) {
      border-bottom: 1px solid #dadada;
    }
    &-item:nth-child(4n + 1) {
      border-left: 1px solid #dadada;
    }
    &-item:nth-child(odd) {
      background-color: @header-bg !important;
    }
  }
</style>
